$(function () {
    //用户名非空验证
    $("#devName").blur(function () {
        var devName = this.value;
        if (devName == null || devName == "") {
            $("#star1").html("用户名不能为空");
        } else {
            $("#star1").html("");
        }
    });
//密码非空验证
    $("#devPassword").blur(function () {
        var devPassword = this.value;
        if (devPassword == null || devPassword == "") {
            $("#star2").html("密码不能为空");
        } else {
            $("#star2").html("")
        }
    });

//    如果用户名或者密码为空，则阻断提交
    var sub = false;
    $("#submit").click(function () {
        var devName = $("#star1").text();
        var devPassword = $("#star2").text();
        if (devName == "" && devPassword == "") {
            sub = true;
        } else {
            sub = false;
        }
        return sub;
    })
})